
#ifndef __STRING_UTILS
#define __STRING_UTILS

#include <vector>
#include <stdarg.h>
#include <apr-1/apr_tables.h>

/** General string utilities collection class. */
namespace StringUtils
{
   char *getDateTimeNowAsString();
   char *getDateTimeNowPlusThisMuchAsString(int secondstime);
   int readFileToString(char **fstring, const char *filename, apr_pool_t *mp);
   int writeStringToFile(const char *fstring, const char *filename, apr_pool_t *mp);
   char *mpprintf(apr_pool_t *mp, const char *format, ...);
   char *mpprintf(apr_pool_t *mp, const char *format, va_list args);
   char *varprintf(const char *format, ...);
   char *varprintf(const char *format, va_list args);
   void destroyStringList(std::vector<char *> *strlist);
   char *flattenStringList(std::vector<char *> *strlist);
   char *flattenStringList(std::vector<char *> *strlist, const char *sep);
   void aggressiveStringSanitiser(char *tstring);
   char *intersectCSL(const char *csl1, const char *csl2);
   char *differenceCSL(const char *csl1, const char *csl2);
   int qsort_strcmp_wrapper(const void *c1, const void *c2);
   int areCapabilitiesAcceptable(char *capswork, char *capscompute);
   void razeString(char **stringpntr);
};

#endif
